﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MedicalDictation
{
    public partial class FormTest : Form
    {
        MainIU myMainIU;
        public FormTest()
        {
            InitializeComponent();
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            myMainIU.Show();
            DateTime time = DateTime.Now;
            string[] myParameters = new string[] { "", "", "3456", "Jorge Arnez", "007", "Test", "Undefined", String.Format("{0:yy:MM:dd:hh:mm}", time) };
            myMainIU.LoadDictation(myParameters, true);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            myMainIU.Show();
            DateTime time = DateTime.Now;
            OpenFileDialog tmpDialog = new OpenFileDialog();
            tmpDialog.Filter = "WAV Files (*.wav)|*.wav|MP3 Files (*.mp3)|*.mp3|All Files (*.*)|*.*";
            tmpDialog.ShowDialog();
            if (tmpDialog.FileName != string.Empty)
            {
                string[] myParameters = new string[] { tmpDialog.FileName, "", "3456", "Jorge Arnez", "007", "Test", "Undefined", String.Format("{0:yy:MM:dd:hh:mm}", time) };
                myMainIU.LoadDictation(myParameters, false);
            }            
        }

        private void FormTest_Load(object sender, EventArgs e)
        {
            myMainIU = new MainIU();
        }
    }
}
